package com.hangwei.paperless.view;

import android.app.Activity;
import android.content.Context;
import android.view.View;

import com.hangwei.paperless.utils.NotFastClickListener;
import com.twelve.all.utils.SPKey;
import com.twelve.all.utils.SPUtil;

/**
 * Created by 张龙臣 on 2020/10/14.
 */

public abstract class BaseView<V extends Context, T> extends NotFastClickListener {

    protected V mActivity;
    protected final String mUserId;

    public View getItemView() {
        return mItemView;
    }

    protected View mItemView;

    public BaseView(V activity) {
        mActivity = activity;
        mUserId = SPUtil.getString(SPKey.Account.USER_ID);
        mItemView = initView();
    }

    protected abstract View initView();

    public void release() {
        mItemView = null;
        mActivity = null;
    }

    /**
     * 每一个子View里面去实现
     *
     * @param subStep 当前子步骤进度
     */
    public void setSubStep(int subStep) {

    }

    public void bindData(T t) {
    }

    public String getCurrentSubStep(){
        return "";
    }
}
